package entity;

import java.util.List;

public class DeptEntity {
    private Integer id;
    private String deptname;
    // 这个变量名是 EmpEntity 表的
    private List<EmpEntity> entityList;

    // 无参构造
    public DeptEntity() {
    }

    // 带参构造
    public DeptEntity(Integer id, String deptname) {
        this.id = id;
        this.deptname = deptname;
    }

    // getting / setting 方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDeptname() {
        return deptname;
    }

    public void setDeptname(String deptname) {
        this.deptname = deptname;
    }

    // 这里的 getting/setting 是 EmpEntity 表的
    public List<EmpEntity> getEntityList() {
        return entityList;
    }

    public void setEntityList(List<EmpEntity> entityList) {
        this.entityList = entityList;
    }

    // 重写 toString 方法
    @Override
    public String toString() {
        return "DeptEntity{" +
                "id=" + id +
                ", deptname='" + deptname + '\'' +
                '}';
    }
}
